﻿<div >
    <header>
        <h2><a href="#myQuote"><i class="glyphicon glyphicon-home"></i></a> &nbsp; My Quotes > {{QC.screenTitle}}</h2>
    </header>  
    <div class="quoteform center">
        <form name="quoteheaderform">
            <div id="quoteButtonsArea" class="row">
                <button type="submit" ng-click="QC.generateContract()" class="btn btn-add"
                        ng-disabled="QC.quote.Header.CONTRACT_ID > 0 ">
                    <i class="glyphicon glyphicon-exclamation-sign"></i>
                    Generate contract
                </button>
                <button type="button" ng-click="QC.produceProposal()" class="btn btn-add">
                    <i class="glyphicon glyphicon-export"></i>
                    Produce proposal
                </button>
                <button type="button" ng-click="QC.routeForApproval()" class="btn btn-add">
                    <i class="glyphicon glyphicon-plus"></i>
                    Route for approval
                </button>
                <button type="button" ng-click="QC.copyQuote()" class="btn btn-add">
                    <i class="glyphicon glyphicon-copy"></i>
                    Copy
                </button>
                <button type="button" ng-click="QC.reload()" class="btn btn-add">
                    <i class="glyphicon glyphicon-refresh"></i>
                    Reload
                </button>
            </div>

            <div id="quoteTopAreaShort" class="row" ng-if="!QC.headerExpanded">
                <div class="col-lg-7">
                    <fieldset>
                        <legend>Header data</legend>
                        <div class="form-group row">
                            <label for="QUOTE_NUMBER" class="col-sm-2 form-control-label">Quote Number</label>
                            <div class="col-sm-4">
                                {{QC.quote.Header.QUOTE_NUMBER}}
                            </div>
                            <label for="QUOTE_STATUS" class="col-sm-2 form-control-label">Quote status:</label>
                            <div class="col-sm-4">
                                {{QC.quote.Header.QUOTE_STATUS}}
                            </div>
                        </div>
                        <div class="form-group row">
                            <label for="QUOTE_OWNER" class="col-sm-2 form-control-label">Quote Owner</label>
                            <div class="col-sm-4">
                                {{QC.quote.Header.QUOTE_OWNER}}
                            </div>
                            <label for="LAST_UPDATE_DATE" class="col-sm-2 form-control-label">Quote Updated Date</label>
                            <div class="col-sm-4">
                                {{QC.quote.Header.getters.LAST_UPDATE_DATE() | date:'dd MMM yyyy'}}
                            </div>
                        </div>
                        <div class="form-group row">
                            <label for="INSTALLED_AT_CUSTOMER_NAME" class="col-sm-2 form-control-label">Installed At Customer</label>
                            <div class="col-sm-4">
                                {{QC.quote.Header.INSTALLED_AT_CUSTOMER_NAME}}
                            </div> 
                            <label for="SOLD_TO_CUSTOMER_NAME" class="col-sm-2 form-control-label">Sold To Customer</label>
                            <div class="col-sm-4">
                                {{QC.quote.Header.SOLD_TO_CUSTOMER_NAME}}
                            </div>                            
                        </div>
                        <div class="form-group row">
                            <label for="AMOUNT" class="col-sm-2 form-control-label">Total Amount</label>
                            <div class="col-sm-4">
                                {{QC.quote.Header.TOTAL_AMOUNT | number:2}} {{QC.quote.Header.CURRENCY_CODE}}
                            </div>
                            <label for="ACV" class="col-sm-2 form-control-label">ACV</label>
                            <div class="col-sm-4">
                                {{QC.quote.Header.ACV | number:2}}
                            </div>
                        </div>
                        <div class="form-group row">
                            <label for="START_DATE" class="col-sm-2 form-control-label">Quote Start Date</label>
                            <div class="col-sm-4">
                                {{QC.quote.Header.getters.START_DATE() | date:'dd MMM yyyy'}}
                            </div>
                            <label for="END_DATE" class="col-sm-2 form-control-label">Quote End Date</label>
                            <div class="col-sm-4">
                                {{QC.quote.Header.getters.END_DATE() | date:'dd MMM yyyy'}}
                            </div>
                        </div>
                    </fieldset>
                </div>
                <div class="col-lg-5" id="quoteLinesArea">
                    <fieldset>
                        <legend>Maintenance Lines</legend>
                        <table st-table="quoteLinesDisplay" st-safe-src="QC.quote.Lines" class="table contractstable">
                            <thead>
                                <tr>
                                    <th>Maintenance item</th>
                                    <th>Item description</th>
                                    <th>Coverage type</th>
                                    <th>Total amount</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr ng-repeat="row in QC.quote.Lines" ng-class="{'st-selected-line': row.isSelected}" ng-click="QC.selectLine(row)">
                                    <td>{{ row.MAINTENANCE_ITEM }}</td>
                                    <td>
                                        <st-editable-field ng-model="QC.quote.Lines[$index].MAINTENANCE_ITEM_DESCRIPTION" name="Lines.MAINTENANCE_ITEM_DESCRIPTION" type="textarea"></st-editable-field>
                                    </td>
                                    <td>{{ row.COVERAGE_TYPE }}</td>
                                    <td>{{ row.TOTAL_AMOUNT | number:2}}</td>
                                </tr>
                            </tbody>
                        </table>                        
                    </fieldset>
                </div>
                <div class="row expand">
                    <div class="col-lg-12 text-right">
                        <i class="glyphicon  glyphicon-menu-down" ng-click="QC.toggleHeader()"></i>
                    </div>
                </div>
            </div>

            <div id="quoteTopAreaFull" class="row" ng-if="QC.headerExpanded">
                <div class=" col-lg-12" id="quoteHeaderArea">
                    <fieldset>
                        <legend>Header data</legend>
                        <!--ng-show="headerExpanded || isNewQuote">-->
                        <!-- ==================QUOTE GENERAL DETAILS ===================== -->
                        <div class="form-group row">
                            <label for="QUOTE_NUMBER" class="col-sm-1 control-label">Quote Number</label>
                            <div class="col-sm-2">
                                <input type="text" class="form-control" id="QUOTE_NUMBER" ng-model="QC.quote.Header.QUOTE_NUMBER" readonly>
                            </div>
                            <label for="CREATION_DATE" class="col-sm-1 control-label">Quote Creation Date</label>
                            <div class="col-sm-2">
                                <input type="text" class="form-control" id="CREATION_DATE" ng-model="QC.quote.Header.getters.CREATION_DATE() | date:'dd MMM yyyy'" ng-model-options="{ getterSetter: true }" readonly>
                            </div>
                            <label for="QUOTE_STATUS" class="col-sm-1 control-label">Quote Status</label>
                            <div class="col-sm-2">
                                <input type="text" class="form-control" id="QUOTE_STATUS" ng-model="QC.quote.Header.QUOTE_STATUS" readonly>
                            </div>
                            <label for="LAST_UPDATE_DATE" class="col-sm-1 control-label">Quote Updated Date</label>
                            <div class="col-sm-2">
                                <input type="text" class="form-control" id="LAST_UPDATE_DATE" ng-model="QC.quote.Header.getters.LAST_UPDATE_DATE() | date:'dd MMM yyyy'" ng-model-options="{ getterSetter: true }" readonly>
                            </div>
                        </div>
                        <div class="form-group row">
                            
                            
                        </div>
                        <div class="form-group row">
                            <label for="QUOTE_OWNER" class="col-sm-1 control-label">Quote Owner</label>
                            <div class="col-sm-2">
                                <input type="text" class="form-control" id="QUOTE_OWNER" ng-model="QC.quote.Header.QUOTE_OWNER" readonly>
                            </div>
                            <label for="DATE_APPROVED" class="col-sm-1 control-label">Quote Approval Date</label>
                            <div class="col-sm-2">
                                <input type="text" class="form-control" id="DATE_APPROVED" ng-model="QC.quote.Header.getters.DATE_APPROVED() | date:'dd MMM yyyy'" ng-model-options="{ getterSetter: true }" readonly>
                            </div>

                            <label for="LEAD_CONTRACT_NUMBER" class="col-sm-1 control-label">New Contract Number</label>
                            <div class="col-sm-2">
                                <input type="text" class="form-control" id="LEAD_CONTRACT_NUMBER" ng-model="QC.quote.Header.LEAD_CONTRACT_NUMBER" readonly>
                            </div>
                            <label for="CONTRACT_NUMBER_MODIFIER" class="col-sm-1 control-label">Modifier</label>
                            <div class="col-sm-2">
                                <input type="text" class="form-control" id="CONTRACT_NUMBER_MODIFIER" ng-model="QC.quote.Header.CONTRACT_NUMBER_MODIFIER" ng-model-options="{ updateOn: 'blur' }" />
                            </div>
                        </div>

                        <div class="separator"><hr /></div>
                        <!-- ==================CONTRACT DETAILS ===================== -->
                        <!--<div class="form-group row">
                            <label for="LEAD_CONTRACT_NUMBER" class="col-sm-2 control-label">New Contract Number</label>
                            <div class="col-sm-4">
                                <input type="text" class="form-control" id="LEAD_CONTRACT_NUMBER" ng-model="QC.quote.Header.LEAD_CONTRACT_NUMBER" readonly>
                            </div>
                            <label for="CONTRACT_NUMBER_MODIFIER" class="col-sm-2 control-label">Modifier</label>
                            <div class="col-sm-4">
                                <input type="text" class="form-control" id="CONTRACT_NUMBER_MODIFIER" ng-model="QC.quote.Header.CONTRACT_NUMBER_MODIFIER" ng-model-options="{ updateOn: 'blur' }" />
                            </div>
                        </div>

                        <div class="separator"><hr /></div>-->

                        <!-- ==================SFDC DETAILS ===================== -->
                        <div class="form-group row">
                            <label for="OPPORTUNITY_NUMBER" class="col-sm-1 form-control-label">Opportunity Number</label>
                            <div class="col-sm-4 col-lg-2">
                                <div class="input-group">
                                    <input type="text" class="form-control" id="OPPORTUNITY_NUMBER" ng-model="QC.quote.Header.OPPORTUNITY_NUMBER" ng-model-options="{ updateOn: 'blur' }">
                                    <span class="input-group-btn">
                                        <button class="btn btn-default" type="button" ng-click="QC.searchOpportunity()"><i class="glyphicon glyphicon-search"></i></button>
                                    </span>
                                </div>
                            </div>
                            <label for="PRIMARY_QUOTE_FLAG" class="col-sm-1 form-control-label">Customer PO Number</label>
                            <div class="col-sm-2">
                                <input type="text" class="form-control" id="CUST_PO_NUMBER" ng-model="QC.quote.Header.CUST_PO_NUMBER" ng-model-options="{ updateOn: 'blur' }">
                            </div>

                            <label for="PRIMARY_QUOTE_FLAG" class="col-sm-1 form-control-label">Primary Quote</label>
                            <div class="col-sm-2">
                                <input type="checkbox" id="PRIMARY_QUOTE_FLAG" ng-model="QC.quote.Header.PRIMARY_QUOTE_FLAG" disabled>
                            </div>
                        </div>

                        <div class="separator"><hr /></div>

                        <!-- ==================CUSTOMER DETAILS ===================== -->
                        <div class="form-group row">
                            <label for="OPERATING_UNIT_ID" class="col-sm-1 form-control-label">Operating Unit</label>
                            <div class="col-sm-2">
                                <select name="OPERATING_UNIT_ID" id="OPERATING_UNIT_ID" class="form-control"
                                        ng-options="option.KEY as option.VALUE for option in QC.selectOptions.OPERATING_UNIT_ID"
                                        ng-model="QC.quote.Header.OPERATING_UNIT_ID" required>
                                    <option value="">-- Select operating unit --</option>
                                </select>
                            </div>
                            <label for="INSTALLED_AT_PARTY_ID" class="col-sm-1 form-control-label">Installed At Customer</label>
                            <div class="col-sm-2">
                                <select name="INSTALLED_AT_PARTY_ID" id="INSTALLED_AT_PARTY_ID" class="form-control"
                                        ng-options="option.KEY as option.VALUE for option in QC.selectOptions.CUSTOMER_INSTALLED_AT"
                                        ng-model="QC.quote.Header.INSTALLED_AT_PARTY_ID" required>
                                    <option value="">-- Select customer name --</option>
                                </select>
                            </div>
                            <label for="SOLD_TO_PARTY_ID" class="col-sm-1 form-control-label">Sold To Customer</label>
                            <div class="col-sm-2">
                                <select name="SOLD_TO_PARTY_ID" id="SOLD_TO_PARTY_ID" class="form-control"
                                        ng-options="option.KEY as option.VALUE for option in QC.selectOptions.CUSTOMER_SOLD_TO"
                                        ng-model="QC.quote.Header.SOLD_TO_PARTY_ID" ng-change="QC.getBillToShipToCustomersOptions()" required>
                                    <option value="">-- Select customer name --</option>
                                </select>
                            </div>

                        </div>                        
                        <!--<div class="form-group row">
                            <label for="INSTALLED_AT_PARTY_ID" class="col-sm-2 form-control-label">Installed At Customer</label>
                            <div class="col-sm-4">
                                <select name="INSTALLED_AT_PARTY_ID" id="INSTALLED_AT_PARTY_ID" class="form-control"
                                        ng-options="option.KEY as option.VALUE for option in QC.selectOptions.CUSTOMER_INSTALLED_AT"
                                        ng-model="QC.quote.Header.INSTALLED_AT_PARTY_ID" required>
                                    <option value="">-- Select customer name --</option>
                                </select>
                            </div>                                                 
                            <label for="SOLD_TO_PARTY_ID" class="col-sm-2 form-control-label">Sold To Customer</label>
                            <div class="col-sm-4">
                                <select name="SOLD_TO_PARTY_ID" id="SOLD_TO_PARTY_ID" class="form-control"
                                        ng-options="option.KEY as option.VALUE for option in QC.selectOptions.CUSTOMER_SOLD_TO"
                                        ng-model="QC.quote.Header.SOLD_TO_PARTY_ID" ng-change="QC.getBillToShipToCustomersOptions()" required>
                                    <option value="">-- Select customer name --</option>
                                </select>
                            </div>
                        </div>-->
                        <!--"BILL_TO_CUSTOMER":"",-->
                        <div class="form-group row">
                            <label for="BILL_TO_CUSTOMER" class="col-sm-1 form-control-label">Bill To Customer</label>
                            <div class="col-sm-2">
                                <select name="BILL_TO_CUSTOMER" id="BILL_TO_CUSTOMER" class="form-control"
                                        ng-options="option.KEY as option.VALUE for option in QC.selectOptions.CUSTOMER_BILL_SHIP_TO"
                                        ng-model="QC.quote.Header.BILL_TO_CUSTOMER_ID" ng-change="QC.getBillToShipToAddressOptions('BILL_TO')" required>
                                    <option value="">-- Select customer name --</option>
                                </select>
                            </div>
                            <!--"BILL_TO_SITE_USE_ID":"",-->
                            <label for="BILL_TO_SITE_USE_ID" class="col-sm-1 form-control-label">Bill To Address</label>
                            <div class="col-sm-2">
                                <select name="BILL_TO_SITE_USE_ID" id="BILL_TO_SITE_USE_ID" class="form-control"
                                        ng-options="option.SITE_USE_ID as option.ADDRESS for option in QC.selectOptions.BILL_TO_SITE"
                                        ng-model="QC.quote.Header.BILL_TO_SITE_USE_ID" required>
                                    <option value="">-- Select address --</option>
                                </select>
                            </div>

                            <label for="SHIP_TO_CUSTOMER" class="col-sm-1 form-control-label">Ship To Customer</label>
                            <div class="col-sm-2">
                                <select name="SHIP_TO_CUSTOMER" id="SHIP_TO_CUSTOMER" class="form-control"
                                        ng-options="option.KEY as option.VALUE for option in QC.selectOptions.CUSTOMER_BILL_SHIP_TO"
                                        ng-model="QC.quote.Header.SHIP_TO_CUSTOMER_ID" ng-change="QC.getBillToShipToAddressOptions('SHIP_TO')" required>
                                    <option value="">-- Select customer name --</option>
                                </select>
                            </div>
                            <!--"SHIP_TO_SITE_USE_ID":"",-->
                            <label for="SHIP_TO_SITE_USE_ID" class="col-sm-1 form-control-label">Ship To Address</label>
                            <div class="col-sm-2">
                                <select name="SHIP_TO_SITE_USE_ID" id="SHIP_TO_SITE_USE_ID" class="form-control"
                                        ng-options="option.SITE_USE_ID as option.ADDRESS for option in QC.selectOptions.SHIP_TO_SITE"
                                        ng-model="QC.quote.Header.SHIP_TO_SITE_USE_ID" required>
                                    <option value="">-- Select address --</option>
                                </select>
                            </div>


                        </div>
                        <!--"SHIP_TO_CUSTOMER":""
                        <div class="form-group row">
                            <label for="SHIP_TO_CUSTOMER" class="col-sm-2 form-control-label">Ship To Customer</label>
                            <div class="col-sm-4">
                                <select name="SHIP_TO_CUSTOMER" id="SHIP_TO_CUSTOMER" class="form-control"
                                        ng-options="option.KEY as option.VALUE for option in QC.selectOptions.CUSTOMER_BILL_SHIP_TO"
                                        ng-model="QC.quote.Header.SHIP_TO_CUSTOMER_ID" ng-change="QC.getBillToShipToAddressOptions('SHIP_TO')" required>
                                    <option value="">-- Select customer name --</option>
                                </select>
                            </div>
                  
                            <label for="SHIP_TO_SITE_USE_ID" class="col-sm-2 form-control-label">Ship To Address</label>
                            <div class="col-sm-4">
                                <select name="SHIP_TO_SITE_USE_ID" id="SHIP_TO_SITE_USE_ID" class="form-control"
                                        ng-options="option.SITE_USE_ID as option.ADDRESS for option in QC.selectOptions.SHIP_TO_SITE"
                                        ng-model="QC.quote.Header.SHIP_TO_SITE_USE_ID" required>
                                    <option value="">-- Select address --</option>
                                </select>
                            </div>
                        </div>-->
                       

                        <div class="separator"><hr /></div>

                        <!-- ==================DATES, DURATION AND AMOUNT===================== -->
                        <div class="form-group row">
                            <label for="START_DATE" class="col-sm-1 form-control-label">Quote Start Date</label>
                            <div class="col-sm-2">
                                <input type="text" class="form-control" id="START_DATE" ng-model="QC.quote.Header.getters.START_DATE() | date:'dd MMM yyyy'" ng-model-options="{ getterSetter: true }" readonly>
                            </div>
                            <label for="END_DATE" class="col-sm-1 form-control-label">Quote End Date</label>
                            <div class="col-sm-2">
                                <input type="text" class="form-control" id="END_DATE" ng-model="QC.quote.Header.getters.END_DATE() | date:'dd MMM yyyy'" ng-model-options="{ getterSetter: true }" readonly>
                            </div>
                        <!--</div>
                        <div class="form-group row">-->
                            <label for="DURATION" class="col-sm-1 form-control-label">Duration</label>
                            <div class="col-sm-2 col-lg-1">
                                <div class="input-group">
                                    <input type="text" class="form-control" id="DURATION" ng-model="QC.quote.Header.DURATION" readonly>
                                    <span class="input-group-addon">{{QC.quote.Header.DURATION_UOM}}</span>
                                </div>
                            </div>
                            <label for="AUTO_INVOICING_FLAG" class="col-sm-1 form-control-label">Auto Invoicing Flag</label>
                            <div class="col-sm-2">
                                <input type="text" class="form-control" id="AUTO_INVOICING_FLAG" ng-model="QC.quote.Header.AUTO_INVOICING_FLAG" readonly>
                                <!--<div class="radio-inline" ng-repeat="itm in QC.selectOptions.AUTO_INVOICING_FLAG">
                                    <label>
                                        <input type="radio" name="AUTO_INVOICING_FLAG" ng-model="QC.quote.Header.AUTO_INVOICING_FLAG" ng-value="{{itm.value}}" required>
                                        {{itm.name}}
                                    </label>
                                </div>-->
                            </div>


                        </div>
                        <div class="form-group row">
                            <label for="TOTAL_AMOUNT" class="col-sm-1 form-control-label">Total Amount</label>
                            <div class="col-sm-5 col-lg-2">
                                <div class="input-group">
                                    <input type="text" class="form-control" id="TOTAL_AMOUNT" ng-model="QC.quote.Header.getters.TOTAL_AMOUNT() | number:2" ng-model-options="{ getterSetter: true }" readonly>
                                    <span class="input-group-addon">
                                        <select name="CURRENCY_CODE" id="CURRENCY_CODE"
                                                ng-options="option.CODE as option.CODE for option in QC.selectOptions.CURRENCY_CODE"
                                                ng-model="QC.quote.Header.CURRENCY_CODE" required>
                                            <option value="">-- Currency --</option>
                                        </select>
                                    </span>
                                </div>
                            </div>
                            <label for="ACV" class="col-sm-1 form-control-label">ACV</label>
                            <div class="col-sm-2">
                                <input type="text" class="form-control" id="ACV" ng-model="QC.quote.Header.getters.ACV() | number:2" ng-model-options="{ getterSetter: true }" readonly>
                            </div>
                        </div>

                        <div class="separator"><hr /></div>

                        <!-- ==================ONE LINE DISCOUNT AND MULTI YEAR INSENTIVE ===================== -->                      
                        <div class="form-group row">
                            <ng-form name="discountform">
                                <label for="ONE_LINE_DISCOUNT" class="col-sm-1 form-control-label">One line discount:</label>
                                <div class="col-sm-4 col-lg-2">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <select name="ONE_LINE_DISCOUNT_TYPE" id="ONE_LINE_DISCOUNT_TYPE"
                                                    ng-options="option.value as option.name for option in QC.selectOptions.ONE_LINE_DISCOUNT_TYPE"
                                                    ng-model="QC.quote.Header.ONE_LINE_DISCOUNT_TYPE">
                                                <option value="">-- Type --</option>
                                            </select>
                                        </span>
                                        <input type="text" class="form-control" id="ONE_LINE_DISCOUNT"
                                               ng-model="QC.quote.Header.ONE_LINE_DISCOUNT"
                                               ng-required="QC.quote.Header.ONE_LINE_DISCOUNT_TYPE" >
                                    </div>
                                </div>
                                <label for="MULTI_YEAR_INCENTIVE" class="col-sm-1 form-control-label">Multi year incentive %:</label>
                                <div class="col-sm-4 col-lg-2">
                                    <div class=" input-group">
                                        <span class="input-group-addon">
                                            <input type="checkbox" name="PRE_PAID_INDICATION" id="PRE_PAID_INDICATION" ng-model="QC.quote.Header.PRE_PAID_INDICATION" ng-true-value="'Y'" ng-false-value="'N'" />
                                            <label for="pre_paid_indication">Pre Paid</label>
                                        </span>
                                        <span class="input-group-addon">
                                            <select name="MULTI_YEAR_INCENTIVE" id="MULTI_YEAR_INCENTIVE"
                                                    ng-options="option.value as option.name for option in QC.selectOptions.MULTI_YEAR_INCENTIVE"
                                                    ng-model="QC.quote.Header.MULTI_YEAR_INCENTIVE" ng-model-options="{ updateOn: 'change' }"
                                                    ng-required="QC.quote.Header.PRE_PAID_INDICATION=='Y'" ng-disabled="QC.quote.Header.PRE_PAID_INDICATION!='Y'">
                                                <option value="">-- Select --</option>
                                            </select>
                                        </span>
                                    </div><!-- /input-group -->
                                </div>
                                <div class="col-lg-4">                <!--buttons-->                  
                                    <button class="btn btn-clear" type="button" title="Revert Discount" 
                                            ng-click="QC.revertDiscount()"
                                            ng-disabled="QC.DisableRevertButtonFlag">
                                        <i class="glyphicon glyphicon-remove"></i>
                                        Revert Discount
                                    </button>
                                    <button class="btn btn-search" type="button" title="Discount"
                                            ng-click="QC.setDiscount(discountform)"
                                            ng-disabled="QC.DisableDiscountButtonFlag || (!QC.quote.Header.ONE_LINE_DISCOUNT_TYPE && QC.quote.Header.PRE_PAID_INDICATION!='Y')">
                                        <i class="glyphicon glyphicon-ok"></i>
                                        Set Discount
                                    </button>                                  
                                </div>                               
                            </ng-form>
                        </div>                           
                        
                            <!--<div class="separator"><hr /></div>-->

                        <!-- ==================Notes for approvers ===================== -->
                        <div class="form-group row">
                            <label for="NOTES_FOR_APPROVERS" class="col-sm-1 form-control-label">Notes for approvers:</label>
                            <div class="col-sm-10 col-lg-4">
                                <textarea id="NOTES_TO_APPROVERS" ng-model="QC.quote.Header.NOTES_TO_APPROVERS"></textarea>
                            </div>
                        </div>
                    </fieldset>
                </div>
                <div class="col-lg-5">
                    

                </div>
                <div class="row">
                    <div class="col-lg-12 text-right">
                        <i class="glyphicon glyphicon-menu-up" ng-click="QC.toggleHeader()"></i>
                    </div>
                </div>
            </div>
        </form>

        <!--<div id="message" ng-if="QC.quote.SubLines.length==0" class="alert alert-info">
            Select maintenance line to see sublines
        </div>-->

        <div id="quoteSubLinesArea" class="row">
            <div class="row">
                <!-- Nav tabs -->
                <div class="col-lg-5 navColumn">
                    <ul class="nav nav-tabs" role="tablist">
                        <li role="presentation" ng-class="{'active':QC.SLTab==1}">
                            <a href="" ng-click="QC.SLTab=1" aria-controls="home" role="tab" data-toggle="tab">Main Info</a>
                        </li>
                        <li role="presentation" ng-class="{'active':QC.SLTab==2}">
                            <a href="" ng-click="QC.SLTab=2" aria-controls="profile" role="tab" data-toggle="tab">Additional Info</a>
                        </li>
                        <li role="presentation" ng-class="{'active':QC.SLTab==3}">
                            <a href="" ng-click="QC.SLTab=3" aria-controls="policy" role="tab" data-toggle="tab">Policy & Master Agreement</a>
                        </li>
                    </ul>
                </div>
                <div class="col-lg-7">
                    <!-- Remove Selected Rows Button -->
                    <button type="button" ng-click="QC.removeSelectedSublines()" class="btn btn-sm btn-info removeRow">
                        <i class="glyphicon glyphicon-minus">
                        </i> Remove Selected items
                    </button>
                    <!-- Mark as Lead contract button -->
                    <!--<button type="button" ng-click="contracts.removeSelectedRows()" class="btn btn-sm btn-info removeRow">
                        <i class="glyphicon glyphicon-star">
                        </i> Mark as Lead Contract
                    </button>-->
                </div>
            </div>

            <!--<ul class="tableTabs">
                <li><a href="" ng-click="QC.SLTab=1" ng-class="{'active': QC.SLTab==1}">Main Info</a></li>
                <li><a href="" ng-click="QC.SLTab=2" ng-class="{'active': QC.SLTab==2}">Additional Info</a></li>
                <li><a href="" ng-click="QC.SLTab=3" ng-class="{'active': QC.SLTab==3}">Policy & Master Agreement</a></li>
            </ul>-->
            <table st-table="quoteSubLinesDisplay" st-safe-src="QC.quote.SubLines" st-set-filter="customFilter" class="table contractstable">                                
                <thead>
                    <tr>
                        <!--    Tab : Main Info -->
                        <th class="sublines-static-column"></th>
                        <th st-sort="INSTANCE_NUMBER" class="sublines-static-column">Instance Number</th>
                        <th st-sort="MAINTENANCE_ITEM" ng-if="QC.SLTab==1">Maint. Item</th>
                        <th st-sort="COVERED_PRODUCT" ng-if="QC.SLTab==1" name="a" st-filter-custom-icon>Covered Product</th>
                        <th st-sort="SOLUTION_VERSION" ng-if="QC.SLTab==1">Solution Version </th>
                        <th st-sort="START_DATE" ng-if="QC.SLTab==1" name="b" st-filter-custom-icon>Start Date</th>
                        <th st-sort="END_DATE" ng-if="QC.SLTab==1" name="c" st-filter-custom-icon>End Date</th>
                        <th st-sort="DURATION" ng-if="QC.SLTab==1">Duration</th>
                        <th st-sort="SERIAL_NUMBER" ng-if="QC.SLTab==1">Serial Number</th>
                        <th st-sort="DIVISION_NAME" ng-if="QC.SLTab==1" name="d" st-filter-custom-icon>Division Name</th>
                        <th st-sort="QUANTITY" ng-if="QC.SLTab==1">Quantity</th>
                        <th st-sort="NUMBER_LISCENCES" ng-if="QC.SLTab==1">Number of Licenses</th>
                        <th st-sort="TOTAL_LIST_PRICE" ng-if="QC.SLTab==1">List Price</th>
                        <th st-sort="TOTAL_NET_PRICE" ng-if="QC.SLTab==1">Net Price</th>
                        <th st-sort="MAINTENANCE_SOURCE" ng-if="QC.SLTab==1">Maint. Source</th>
                        <th st-sort="MAINTENEACE_RATE" ng-if="QC.SLTab==1">Maint. % Rate</th>
                        <th st-sort="BASE_MAINTENANCE_PRICE" ng-if="QC.SLTab==1">Base Price</th>
                        <th st-sort="PREVIOUS_AMOUNT" ng-if="QC.SLTab==1">Previous Amount</th>
                        <th st-sort="CURRENT_AMOUNT" ng-if="QC.SLTab==1">Current Amount</th>
                        <th st-sort="COL" ng-if="QC.SLTab==1" st-filter-custom-icon>COL %</th>
                        <th st-sort="MAINT_PRICE_INCLUDING_COL" ng-if="QC.SLTab==1">Amount Including COL</th>
                        <th st-sort="ANNUAL_MAINT_PRICE_INCL_COL" ng-if="QC.SLTab==1">Annual Amount Including COL</th>
                        <th st-sort="SUBLINE_STATUS" ng-if="QC.SLTab==1">Subline Status</th>
                        <!--    Tab : Additional Info   -->
                        <th st-sort="INSTALLED_AT_COUNTRY" ng-if="QC.SLTab==2">Installed At Country</th>
                        <th st-sort="INSTALLED_AT_CITY" ng-if="QC.SLTab==2">Installed At City</th>
                        <th st-sort="SHIP_TO_CUSTOMER_NAME" ng-if="QC.SLTab==2">Ship To Customer</th>
                        <th st-sort="BILL_TO_CUSTOMER_NAME" ng-if="QC.SLTab==2">Bill To Customer</th>
                        <th st-sort="SOURCE_ORDER" ng-if="QC.SLTab==2">Source Sales Order</th>
                        <th st-sort="" ng-if="QC.SLTab==2">Source Contract</th>
                        <th st-sort="PRODUCT_INITIAL_PO_NUMBER" ng-if="QC.SLTab==2">Product Initial PO</th>
                        <th st-sort="LAST_RENEWAL_CONTRACT_PO_NUM" ng-if="QC.SLTab==2">Source Contract's PO</th>
                        <th st-sort="PRODUCT_ORIG_SHIP_DATE" ng-if="QC.SLTab==2">Product Shipping Date</th>
                        <th st-sort="COVERED_PRODUCT_DESCRIPTION" ng-if="QC.SLTab==2">Description</th>
                        <th st-sort="SUNSET_PRODUCT" ng-if="QC.SLTab==2">Sunset Product</th>
                        <th st-sort="" ng-if="QC.SLTab==2">Back Bill</th>
                        <th st-sort="TOP_DIVISION" ng-if="QC.SLTab==2" st-filter-custom-icon>Top Division</th>
                        <!--    Tab : Policy & Master Agreement -->
                        <th st-sort="" ng-if="QC.SLTab==3">Policy Maintenance % Rate</th>
                        <th st-sort="" ng-if="QC.SLTab==3">Policy Source</th>
                        <th st-sort="" ng-if="QC.SLTab==3">Policy COL %</th>
                        <th st-sort="" ng-if="QC.SLTab==3">MA Maintenance % Rate</th>
                        <th st-sort="" ng-if="QC.SLTab==3">MA Source</th>
                        <th st-sort="" ng-if="QC.SLTab==3">MA COL %</th>
                    </tr>   
                    <tr>
                        <th class="filtersContainer" ng-show="QC.showDiv">
                            <header style="background-color:#d9edf7; color:#31708f; border-color:#bce8f1">
                                <h2>SubLines Filters</h2>
                                <button type="button" class="btn btn-default btn-sm closeFilter" ng-click='QC.closeFilter()'>
                                    <span class="glyphicon glyphicon-remove"></span> Close
                                </button>
                            </header>
                            <uib-accordion close-others="oneAtATime">
                                <div uib-accordion-group name="a" class="panel-default" heading="Covered product" ng-init="status = {isOpen: false}" is-open="">
                                    <uib-accordion-heading>
                                        Covered product
                                        <i class="pull-left glyphicon glyphicon-filter"></i>
                                        <i class="pull-right glyphicon" ng-class="{'glyphicon-chevron-down': status.open, 'glyphicon-chevron-right': !status.open}"></i>
                                    </uib-accordion-heading>
                                    <st-select-multiple collection="QC.quote.SubLines" predicate="COVERED_PRODUCT"></st-select-multiple>
                                </div>
                                <div uib-accordion-group name="b" class="panel-default" heading="Sunset product" ng-init="status = {isOpen: false}" is-open="">
                                    <uib-accordion-heading>
                                        Sunset product
                                        <i class="pull-left glyphicon glyphicon-filter"></i>
                                        <i class="pull-right glyphicon" ng-class="{'glyphicon-chevron-down': status.open, 'glyphicon-chevron-right': !status.open}"></i>
                                    </uib-accordion-heading>
                                    <st-select-distinct collection="QC.quote.SubLines" predicate="SUNSET_PRODUCT"></st-select-distinct>
                                </div>
                                <div uib-accordion-group name="c" class="panel-default" heading="Division name" ng-init="status = {isOpen: false}" is-open="">
                                    <uib-accordion-heading>
                                        Division name
                                        <i class="pull-left glyphicon glyphicon-filter"></i>
                                        <i class="pull-right glyphicon" ng-class="{'glyphicon-chevron-down': status.open, 'glyphicon-chevron-right': !status.open}"></i>
                                    </uib-accordion-heading>
                                    <st-select-multiple collection="QC.quote.SubLines" predicate="DIVISION_NAME"></st-select-multiple>
                                </div>
                                <div uib-accordion-group name="d" class="panel-default" heading="Top Division" ng-init="status = {isOpen: false}" is-open="">
                                    <uib-accordion-heading>
                                        Top Division
                                        <i class="pull-left glyphicon glyphicon-filter"></i>
                                        <i class="pull-right glyphicon" ng-class="{'glyphicon-chevron-down': status.open, 'glyphicon-chevron-right': !status.open}"></i>
                                    </uib-accordion-heading>
                                    <st-select-distinct collection="QC.quote.SubLines" predicate="TOP_DIVISION"></st-select-distinct>
                                </div>
                                <div uib-accordion-group class="panel-default" heading="Ship To Customer">
                                    <uib-accordion-heading>
                                        Ship To Customer
                                        <i class="pull-left glyphicon glyphicon-filter"></i>
                                        <i class="pull-right glyphicon" ng-class="{'glyphicon-chevron-down': status.open, 'glyphicon-chevron-right': !status.open}"></i>
                                    </uib-accordion-heading>
                                    <st-select-multiple collection="QC.quote.SubLines" predicate="SHIP_TO_CUSTOMER_NAME"></st-select-multiple>
                                </div>
                                <div uib-accordion-group class="panel-default" heading="Bill To Customer">
                                    <uib-accordion-heading>
                                        Bill To Customer
                                        <i class="pull-left glyphicon glyphicon-filter"></i>
                                        <i class="pull-right glyphicon" ng-class="{'glyphicon-chevron-down': status.isCustomHeaderOpen, 'glyphicon-chevron-right': !status.isCustomHeaderOpen}"></i>
                                    </uib-accordion-heading>                                    
                                    <st-select-multiple collection="QC.quote.SubLines" predicate="BILL_TO_CUSTOMER_NAME"></st-select-multiple>
                                </div>
                                <div uib-accordion-group class="panel-default" is-open="status.open">
                                    <uib-accordion-heading>
                                        Start Date
                                        <i class="pull-left glyphicon glyphicon-filter"></i>
                                        <i class="pull-right glyphicon" ng-class="{'glyphicon-chevron-down': status.isCustomHeaderOpen, 'glyphicon-chevron-right': !status.isCustomHeaderOpen}"></i>
                                    </uib-accordion-heading>
                                    <st-date-range predicate="START_DATE" before="query.before" after="query.after"></st-date-range>
                                </div>
                                <div uib-accordion-group class="panel-default">
                                    <uib-accordion-heading>
                                        End date
                                        <i class="pull-left glyphicon glyphicon-filter"></i>
                                        <i class="pull-right glyphicon" ng-class="{'glyphicon-chevron-down': status.isCustomHeaderOpen, 'glyphicon-chevron-right': !status.isCustomHeaderOpen}"></i>
                                    </uib-accordion-heading>
                                    <st-date-range predicate="END_DATE" before="query.before" after="query.after"></st-date-range>
                                </div>
                                <div uib-accordion-group class="panel-default" heading="Ship To Customer">
                                    <uib-accordion-heading>
                                        Initial PO Number of Product
                                        <i class="pull-left glyphicon glyphicon-filter"></i>
                                        <i class="pull-right glyphicon" ng-class="{'glyphicon-chevron-down': status.isCustomHeaderOpen, 'glyphicon-chevron-right': !status.isCustomHeaderOpen}"></i>
                                    </uib-accordion-heading>
                                    <st-select-multiple collection="QC.quote.SubLines" predicate="PRODUCT_INITIAL_PO_NUMBER"></st-select-multiple>
                                </div>
                                <div uib-accordion-group class="panel-default" heading="Ship To Customer">
                                    <uib-accordion-heading>
                                        Last Renewal Contract PO Number
                                        <i class="pull-left glyphicon glyphicon-filter"></i>
                                        <i class="pull-right glyphicon" ng-class="{'glyphicon-chevron-down': status.isCustomHeaderOpen, 'glyphicon-chevron-right': !status.isCustomHeaderOpen}"></i>
                                    </uib-accordion-heading>
                                    <st-select-multiple collection="QC.quote.SubLines" predicate="SOURCE_CONTRACT_PO_NUM"></st-select-multiple>
                                </div>
                                <div uib-accordion-group class="panel-default" heading="Ship To Customer">
                                    <uib-accordion-heading>
                                        Subline Contract Status
                                        <i class="pull-left glyphicon glyphicon-filter"></i>
                                        <i class="pull-right glyphicon" ng-class="{'glyphicon-chevron-down': status.isCustomHeaderOpen, 'glyphicon-chevron-right': !status.isCustomHeaderOpen}"></i>
                                    </uib-accordion-heading>
                                    <st-select-distinct collection="QC.quote.SubLines" predicate="SUBLINE_STATUS"></st-select-distinct>
                                </div>
                                <div uib-accordion-group class="panel-default" heading="Ship To Customer">
                                    <uib-accordion-heading>
                                        Maintenance  source
                                        <i class="pull-left glyphicon glyphicon-filter"></i>
                                        <i class="pull-right glyphicon" ng-class="{'glyphicon-chevron-down': status.isCustomHeaderOpen, 'glyphicon-chevron-right': !status.isCustomHeaderOpen}"></i>
                                    </uib-accordion-heading>
                                    <st-select-distinct collection="QC.quote.SubLines" predicate="MA_SOURCE"></st-select-distinct>
                                </div>
                                <div uib-accordion-group class="panel-default" heading="Ship To Customer">
                                    <uib-accordion-heading>
                                        COL %
                                        <i class="pull-left glyphicon glyphicon-filter"></i>
                                        <i class="pull-right glyphicon" ng-class="{'glyphicon-chevron-down': status.isCustomHeaderOpen, 'glyphicon-chevron-right': !status.isCustomHeaderOpen}"></i>
                                    </uib-accordion-heading>
                                    <st-number-range predicate="COL" lower="query.lower" higher="query.higher"></st-number-range>
                                </div>
                                <div uib-accordion-group class="panel-default" heading="Ship To Customer">
                                    <uib-accordion-heading>
                                        Source Order
                                        <i class="pull-left glyphicon glyphicon-filter"></i>
                                        <i class="pull-right glyphicon" ng-class="{'glyphicon-chevron-down': status.isCustomHeaderOpen, 'glyphicon-chevron-right': !status.isCustomHeaderOpen}"></i>
                                    </uib-accordion-heading>
                                    <st-select-multiple collection="QC.quote.SubLines" predicate="SOURCE_ORDER"></st-select-multiple>
                                </div>
                                <div uib-accordion-group class="panel-default" heading="Ship To Customer">
                                    <uib-accordion-heading>
                                        Source Contract
                                        <i class="pull-left glyphicon glyphicon-filter"></i>
                                        <i class="pull-right glyphicon" ng-class="{'glyphicon-chevron-down': status.isCustomHeaderOpen, 'glyphicon-chevron-right': !status.isCustomHeaderOpen}"></i>
                                    </uib-accordion-heading>
                                    <st-select-multiple collection="QC.quote.SubLines" predicate="SOURCE_CONTRACT_NUMBER"></st-select-multiple>
                                </div>
                                <div uib-accordion-group class="panel-default" heading="Ship To Customer">
                                    <uib-accordion-heading>
                                        Back Bill
                                        <i class="pull-left glyphicon glyphicon-filter"></i>
                                        <i class="pull-right glyphicon" ng-class="{'glyphicon-chevron-down': status.isCustomHeaderOpen, 'glyphicon-chevron-right': !status.isCustomHeaderOpen}"></i>
                                    </uib-accordion-heading>
                                    <st-select-distinct collection="QC.quote.SubLines" predicate="BACK_BILL"></st-select-distinct>
                                </div>
                            </uib-accordion>
                        </th>
                    </tr>                                                      
                </thead>
                <tbody>
                    <tr st-select-row="row" st-select-mode="multi" id="{{row.SUBLINE_ID}}" ng-repeat="row in quoteSubLinesDisplay" ng-class="{'st-selected': row.isSelected}">
                        <td cs-select="row">
                            <input type="checkbox" ng-click="QC.selectSubline('SubLines', row)" />
                        </td>
                        <td>{{row.INSTANCE_NUMBER}}</td>

                        <!--Tab1 columns-->
                        <td ng-if="QC.SLTab==1"><st-editable-field ng-model="row.MAINTENANCE_ITEM" name="SubLines.MAINTENANCE_ITEM" row="row" type="select"></st-editable-field></td>
                        <td ng-if="QC.SLTab==1">{{row.COVERED_PRODUCT}}</td>
                        <td ng-if="QC.SLTab==1">{{row.SOLUTION_VERSION}}</td>
                        <td ng-if="QC.SLTab==1"><st-editable-field ng-model="row.START_DATE" name="SubLines.START_DATE" type="date"></st-editable-field></td>
                        <td ng-if="QC.SLTab==1"><st-editable-field ng-model="row.END_DATE" name="SubLines.END_DATE" type="date"></st-editable-field></td>
                        <td ng-if="QC.SLTab==1">{{row.DURATION}}</td>
                        <td ng-if="QC.SLTab==1">{{row.SERIAL_NUMBER}}</td>
                        <td ng-if="QC.SLTab==1">{{row.DIVISION_NAME}}</td>
                        <td ng-if="QC.SLTab==1"><st-editable-field ng-model="row.QUANTITY" name="SubLines.QUANTITY" type="number" max="{{row.QUANTITY}}" min="0"></st-editable-field></td>
                        <td ng-if="QC.SLTab==1"><st-editable-field ng-model="row.NUMBER_LICENCES" name="SubLines.NUMBER_LICENCES" type="number"></st-editable-field></td>
                        <td ng-if="QC.SLTab==1">{{QC.quote.SubLines.getters.TOTAL_LIST_PRICE(row) | number:2}}</td>
                        <td ng-if="QC.SLTab==1">{{QC.quote.SubLines.getters.TOTAL_NET_PRICE(row) | number:2}}</td>
                        <td ng-if="QC.SLTab==1">{{row.MAINTENANCE_SOURCE}}</td>
                        <td ng-if="QC.SLTab==1">{{row.MAINTENANCE_RATE}}</td>
                        <td ng-if="QC.SLTab==1">{{QC.quote.SubLines.getters.BASE_MAINTENANCE_PRICE(row) | number:2}}</td>
                        <td ng-if="QC.SLTab==1">{{QC.quote.SubLines.getters.PREVIOUS_AMOUNT(row) | number:2}}</td>
                        <td ng-if="QC.SLTab==1"><st-editable-field ng-model="row.CURRENT_AMOUNT" name="SubLines.CURRENT_AMOUNT" type="number"></st-editable-field></td>
                        <td ng-if="QC.SLTab==1"><st-editable-field ng-model="row.COL" name="SubLines.COL" type="number"></st-editable-field></td>
                        <td ng-if="QC.SLTab==1">{{QC.quote.SubLines.getters.MAINT_PRICE_INCLUDING_COL(row) | number:2}}</td>
                        <td ng-if="QC.SLTab==1">{{QC.quote.SubLines.getters.ANNUAL_MAINT_PRICE_INCL_COL(row) | number:2}}</td>
                        <td ng-if="QC.SLTab==1">{{row.SUBLINE_STATUS}}</td>

                        <!--Tab 2 columns-->
                        <td ng-if="QC.SLTab==2">{{row.INSTALLED_AT_COUNTRY}}</td>
                        <td ng-if="QC.SLTab==2">{{row.INSTALLED_AT_CITY}}</td>
                        <td ng-if="QC.SLTab==2">{{row.SHIP_TO_CUSTOMER_NAME}}</td>
                        <td ng-if="QC.SLTab==2">{{row.BILL_TO_CUSTOMER_NAME}}</td>
                        <td ng-if="QC.SLTab==2">{{row.SOURCE_ORDER}}</td>
                        <td ng-if="QC.SLTab==2">{{row.SOURCE_CONTRACT_NUMBER}}</td>
                        <td ng-if="QC.SLTab==2">{{row.PRODUCT_INITIAL_PO_NUMBER}}</td>
                        <td ng-if="QC.SLTab==2">{{row.SOURCE_CONTRACT_PO_NUM}}</td>
                        <td ng-if="QC.SLTab==2">{{QC.quote.SubLines.getters.PRODUCT_ORIG_SHIP_DATE(row) | date:"dd MMM yyyy"}}</td>
                        <td ng-if="QC.SLTab==2"><st-editable-field ng-model="row.COVERED_PRODUCT_DESCRIPTION" name="SubLines.COVERED_PRODUCT_DESCRIPTION" type="textarea"></st-editable-field></td>
                        <td ng-if="QC.SLTab==2">{{row.SUNSET_PRODUCT}}</td>
                        <td ng-if="QC.SLTab==2">{{row.BACK_BILL}}</td>
                        <td ng-if="QC.SLTab==2">{{row.TOP_DIVISION_NAME}}</td>

                        <td ng-if="QC.SLTab==3">{{row.POLICY_MAINT_RATE}}</td>
                        <td ng-if="QC.SLTab==3">{{row.POLICY_SOURCE}}</td>
                        <td ng-if="QC.SLTab==3">{{row.POLICY_COL}}</td>
                        <td ng-if="QC.SLTab==3">{{row.MA_MAINT_RATE}}</td>
                        <td ng-if="QC.SLTab==3">{{row.MA_SOURCE}}</td>
                        <td ng-if="QC.SLTab==3">{{row.MA_COL}}</td>
                    </tr>
                </tbody>
                <tfoot>
                    <tr>
                        <td colspan="24" class="text-center">
                            <div st-items-by-page="10" st-pagination="" st-template="templates/stPagination.html"></div>
                        </td>
                    </tr>
                </tfoot>               
            </table>
        </div>


        <div id="testarea" class="row hidden">
            <table st-table="quoteCtrl.quoteSubLinesDisplay" st-safe-src="quoteCtrl.quote.SubLines" st-set-filter="customFilter" class="table contractstable">
                <thead>
                    <tr>
                        <th colspan="4">
                            <input st-search placeholder="global search" class="input-sm form-control" type="search" />
                        </th>
                    </tr>
                    <tr>
                        <th st-sort="MAINTENANCE_ITEM">Maintenance item</th>
                        <th st-sort="COVERED_PRODUCT">Covered product</th>
                        <th st-sort="INSTALLED_AT_COUNTRY">Installed At Country</th>
                        <th st-sort="BILL_TO_CUSTOMER_NAME">Bill To Customer</th>
                        <th st-sort="QUANTITY">Quantity</th>
                        <th st-sort="START_DATE">Start date</th>
                    </tr>
                    <tr>
                        <th>
                            <!--<input st-search="MAINTENANCE_ITEM" placeholder="search for Maintenance item" class="input-sm form-control" type="search" />-->
                            <st-select-distinct collection="quoteCtrl.quote.SubLines" predicate="MAINTENANCE_ITEM"></st-select-distinct>
                        </th>
                        <th>
                            <!--<input st-search="COVERED_PRODUCT" placeholder="search for Covered product" class="input-sm form-control" type="search" />-->
                            <!--<select class="filter-select" st-search="COVERED_PRODUCT">
                                <option value="">All</option>
                                <option ng-repeat="row in quoteCtrl.quote.SubLines | unique:'COVERED_PRODUCT'" value="{{row.COVERED_PRODUCT}}">{{row.COVERED_PRODUCT}}</option>
                            </select>-->
                            <st-select-multiple collection="quoteCtrl.quote.SubLines" predicate="COVERED_PRODUCT"></st-select-multiple>
                        </th>
                        <th>
                            <!--<input st-search="INSTALLED_AT_COUNTRY" placeholder="search for Installed At Country" class="input-sm form-control" type="search" />-->
                            <select class="filter-select" st-search="INSTALLED_AT_COUNTRY">
                                <option value="">All</option>
                                <option ng-repeat="row in quoteCtrl.quote.SubLines | unique:'INSTALLED_AT_COUNTRY'" value="{{row.INSTALLED_AT_COUNTRY}}">{{row.INSTALLED_AT_COUNTRY}}</option>
                            </select>
                        </th>
                        <th>
                            <input st-search="BILL_TO_CUSTOMER_NAME" placeholder="search for Bill To Customer" class="input-sm form-control" type="search" />
                        </th>
                        <th>
                            <st-number-range predicate="QUANTITY" lower="query.lower" higher="query.higher"></st-number-range>
                        </th>
                        <th>
                            <st-date-range predicate="START_DATE" before="query.before" after="query.after"></st-date-range>
                        </th>
                    </tr>
                </thead>
                <tbody>
                    <tr st-select-row="row" id="{{row.SUBLINE_ID}}" ng-repeat="row in quoteCtrl.quoteSubLinesDisplay" ng-class="{'st-selected': row.isSelected}">
                        <td ng-if="quoteCtrl.QC.SLTab==1">{{row.MAINTENANCE_ITEM}}</td>
                        <td ng-if="quoteCtrl.QC.SLTab==1">{{row.COVERED_PRODUCT}}</td>
                        <td ng-if="quoteCtrl.QC.SLTab==1">{{row.INSTALLED_AT_COUNTRY}}</td>
                        <td ng-if="quoteCtrl.QC.SLTab==1">{{row.BILL_TO_CUSTOMER_NAME}}</td>
                        <td ng-if="quoteCtrl.QC.SLTab==1">{{row.QUANTITY}}</td>
                        <td ng-if="quoteCtrl.QC.SLTab==1">{{row.START_DATE}}</td>
                    </tr>
                </tbody>
            </table>
        </div>


        <footer ng-if="QC.quote.Header.QUOTE_STATUS=='NEW'">
            <div class="row">
                <div class="col-lg-6">
                    <button type="button" class="btn btn-back" ng-click="QC.goBack()">
                        <i class="glyphicon glyphicon-chevron-left">
                        </i>
                        Back
                    </button>
                </div>
                <div class="col-lg-6">
                    <!--<a href="#">Cancel</a>-->
                    <!--<a href="#createQuote">Next</a>-->
                    <button type="button" class="btn btn-next" ng-click="QC.finish()">
                        Finish
                    </button>
                </div>
            </div>
        </footer>

        <form action="/Excel" method="post" class="hidden" id="excelform">
            <div>
                <input type="text" ng-model="QC.quote.Header.HEADER_ID" id="txtquotenumber" name="txtquotenumber">
            </div>
            <button name="renderExcel" type="submit">Render Excel</button>
        </form>
    </div>
</div>